home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
diskutil
/
bfrd_10.zoo
/
bfrd.doc
next >
Wrap
Text File
|
1993-07-23
|
15KB
|
240 lines
**************************************************************************
* *
* BU_BFRD.PRG & RES_BFRD.PRG - (Version 1.0) *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
* *
* BOOTSECTOR, FATS & ROOTDIRECTORY BACKUP & RESTORE UTILITIES *
* *
* ( upgrade to BFRDBU.PRG v_1.0, distributed as BFRDBU10.ZOO ) *
* *
* Author: W. Alan B. Evans, University of Kent, Canterbury, UK. *
* *
* (These Programs must NOT be sold commercially without the Author's *
* Permission. FREE Distribution is allowed on condition that the *
* the documentation File, BFRD.DOC, always accompanies the programs) *
* *
* ( WARNING!! These disk utility programs can seriously damage *
* Disk Structures if used incorrectly. It is hereby understood *
* that THESE PROGRAMS ARE USED ENTIRELY AT THE USER'S RISK, and *
* the Author will in NO WAY be responsible for any such damage *
* howsoever caused. wabe@ukc.ac.uk July 1993 ) *
* *
**************************************************************************
Preamble
~~~~~~~~
A few years ago, I had Hard Disk Troubles of the kind that led to
the FATS and ROOTDIRECTORY info on my SH205 being frequently
over-written. This of course results in making the files on that
partition, though largely undamaged, virtually inaccessible. In an
ideal world this should NEVER happen but imperfect hardware, software
and/or human error not to mention human sabotage (malignant FAT-eating
viruses!) can lead to this disastrous situation. As a cure, I
initially wrote a Hard Disk backup program HDQBUR - "Hard Disk Quick
Backup & Restore" which was distributed to the Archives in the past as
part of HD_UTILS). This has since evolved to VTABU - "the Volume
Transferor and Backer-Upper" (not distributed) which enables tha saved
sector-copy of a partition to be restored to a differently (but
adequately!) sized partition on (perhaps) a new Hard Disk. Whilst a
"full" backup of this kind is fine, the fact is that it takes quite a
long time and rather many disk swaps to even back-up a single,
relatively-full 16 Mbyte partition that it tends not to get done very
often. I eventually realised that what I really needed was an utility
that simply copied the FATS and ROOTDIRECTORY Info on a selected
Partition to file (stored on floppy or, perhaps, on another
Partition). This of course is quick and can be done daily or even
every time you boot up. Then if a subsequent disaster occurs this
info can be restored and thus access is regained to the locations of
ALL rootdirectory files (and directories) that have NOT been altered
since the last backup - provided, of course, they are undamaged by the
initial disaster!!. However new files you may have created or files
that have been edited since the last backup will of course be lost or
"uncomplete". But often this is not so bad as they tend to be fresh
in your mind and are usually fairly easily redeemable from some other
source (e.g. floppy copy etc.). After "restoring" such Partitions it
is advisable to check its FATS' integrity with some suitable Utility
such as ICD's "CLEANUP" (which I personally find excellent) or, maybe,
with Jorge Lohse's FSCK.PRG (though this is old and works only on
non-extended {<= 16 Mbyte} and non-BGM partitions) or with other more
recent disk-tools that I've heard of but never tried. Most imperfect
files can be "weeded-out" this way.
Thus BFRDBU.PRG (already distributed to Atari Archive) came to
be - and during the past few years, has saved me a great deal of
trouble, alas on several occasions. The current offering, BU_BFRD.PRG
& RES_BFRD.PRG, is an upgrade on that in the sense that in the tiny
BACKUP_ONLY program, BU_BFRD.PRG, I have implemented the "quick"
cyclic backing of all partitions on "other" partitions (see below)
that I mentioned in the documentation (BFRDBU.DOC) that accompanied
the earlier version and which, indeed, I first thought of when writing
that DOC. This improvement reduced the total time to back-up ALL
partitions on my 105 Mbyte Hard Disk to only 9 secs from the 65 secs
or so it took to back them onto floppy. Of course, this program is
ideal as an AUTO-folder back-up program (it uses no GEM).
RES_BFRD.PRG is similar to BFRDBU.PRG in that it restores and
back-ups, but now with the option of which directory to store the
backup files ( instead of invariably in floppy drive A: ). It also
has several other minor improvements. Like the earlier BFRDBU,
RES_BFRD uses GEM only in its "restore" option, and so could in
principle be used as an AUTO folder program for back-ups only. For
instance, you would do this should you wish all your backup files to
go to a single directory (e.g. A: ).
Of course, these programs also serve as a protection against
accidental "human" FAT corruption as well as FAT corruption due to
faulty Hardware and/or Software. Such a situation could arise (as it
did ONCE for me) when I wished to delete all files in a subdirectory
and so (from GULAM) I typed " rm * ". Yes, you've guessed it - I had
forgotten I'd just changed directory to the root D:\ and GULAM
proceeded to delete ALL files in D:\ - or would have done had I not
hit the warm reset button in panic. As it happened, I had a fairly
recent FAT backup of D:\, and catastrophe was averted by restoring that
- though I blush to admit that I spent about half an hour with a file
UNDELETING tool ( Simon Poole's DLII.PRG) before it became apparent
that this tool (as would all "undeleting" tools I think) was proving
ineffective (as so many deleted files were fragmented) before the
above-mentioned "obvious" solution hit me!
BU_BFRD.PRG - The back-up program - suitable for AUTO folder use.
~~~~~~~~~~~
BU_BFRD will save the Bootsector-Fats-Rootdirectory Info on
selected partitions (or Volumes) into .FBU (Fats Back-Up) files such
as C_BFRD.FBU, .., E_BFRD.FBU that must be saved to "other" (i.e.
distinct) Hard Disk Partitions. It would, of course, be silly to save
C_BFRD.FBU to a file on drive C:\ since it could not be found if C:\'s
FATS became corrupt!!. Saving to Hard Disk (as compared with saving
to floppy) makes the backing up process extremely quick. As mentioned
above I now regularly back-up all my C:\,D:\,E:\ and F:\ partitions on
my ICD 105 Mbyte Hard disk in about 9 seconds when I boot up. So, to
set-up, you must decide a suitable permutation of partitions onto
which to write each partition's backup file. A viable permutation
would be to save these .FBU files to different partitions cyclically -
e.g. if you have Partitions C:\, D:\ and E:\, then save C_BFRD.FBU to
D:\, D_BFRD.FBU to E:\ and E_BFRD.FBU to C:\. As currently configured
you MUST save your LAST Hard Disk Partition onto drive C:\. If this
is F:\ (say) then, to initialise things, you should copy a dummy file
(any old file will do - it'll soon be deleted and replaced) to C:\ and
name it F_BFRD.FBU. The first letter (F) of this filename tells
BU_BFRD how many Hard Disk Partitions exist (nb. the presence of
RAMDISKS could otherwise complicate matters if you were to try to
determine this with the Drvmap() function). You must also copy dummy
files to D:\, E:\ and F:\ and name them similarly - the first letter
of each filename signifying which drive's ROOTDIRECTORY & FATS info is
to be saved to these partitions. Personally I followed the cyclic
permutation convention - so I named these to C_BFRD.FBU on D:\,